Skip to content

Add ActorTemplate and ActorTemplateVersion as substrate resources; Add CRUD methods in redis package - #824

Open
Zoe Zhao (zoez7) wants to merge 9 commits into
agent-substrate:mainfrom
zoez7:atv-br-1.5
Open

Add ActorTemplate and ActorTemplateVersion as substrate resources; Add CRUD methods in redis package#824
Zoe Zhao (zoez7) wants to merge 9 commits into
agent-substrate:mainfrom
zoez7:atv-br-1.5

Conversation

@zoez7

@zoez7 Zoe Zhao (zoez7) commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Part of #477 .

All ATV fields are immutable. SandboxConifg will be frozen into ATV at creation time.
Adds per-resource store methods and the ateredis package for the AT and ATV as global resources.

Comment thread pkg/proto/ateapipb/ateapi.proto Outdated
Comment thread cmd/ateapi/internal/store/ateredis/ateredis.go Outdated
@zoez7 Zoe Zhao (zoez7) changed the title ateapi/store: persist ActorTemplate and ActorTemplateVersion Add ActorTemplate and ActorTemplateVersion as substrate resources; Add CRUD methods in redis package Aug 10, 2026
@zoez7
Zoe Zhao (zoez7) force-pushed the atv-br-1.5 branch 2 times, most recently from 8546ab7 to 47fb420 Compare August 10, 2026 20:26
…ne proto

Introduce ActorTemplate (identity + placement policy) and
ActorTemplateVersion (immutable workload definition), along with the
supporting SandboxClass/SandboxConfig, SnapshotsConfig, ResumeSource,
and OnResumeConfig messages. Both resources are flat: workload and
status fields live directly on the message, like Actor.

The version State enum (nested in ActorTemplateVersion, like
Actor.Status) mirrors the existing ActorTemplateVersion CRD PhaseType
(RESUME_GOLDEN_ACTOR -> WAIT_GOLDEN_ACTOR -> {READY | FAILED}, with
UNSPECIFIED for the initial empty phase).
Adds per-resource store methods and the ateredis implementation for the
two new global-scoped resources, following the Atespace/Actor patterns:
SetNX creates with server-owned metadata, WATCH+version CAS update for
ActorTemplate, and SCAN-based listing.

ListActorTemplateVersions filters by parent after fetching (the parent
lives in the value, not the key); matches count toward the page so pages
stay full. DeleteActorTemplate rejects while any version names it as
parent. DeleteActorTemplateVersion rejects while it is its parent's
default_version_on_create and deletes the golden snapshot recorded in
its status before removing the version record.
Comment thread pkg/proto/ateapipb/ateapi.proto Outdated
Comment thread cmd/ateapi/internal/store/store.go Outdated
Comment thread cmd/ateapi/internal/store/ateredis/ateredis.go Outdated
@zoez7
Zoe Zhao (zoez7) force-pushed the atv-br-1.5 branch 5 times, most recently from bf7fb99 to c07f05f Compare August 11, 2026 15:34
@zoez7

Copy link
Copy Markdown
Collaborator Author

Failing tests at head: one of them is being fixed in #857
Another one is flaky: #675 ...

@zoez7

Copy link
Copy Markdown
Collaborator Author

I have not yet incorporated the resource limits added in #679, will incorporate in a separate PR once #679 merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants